#!/bin/awk -f
# Note: on Solaris, use nawk instead
BEGIN {
	for (i = 0; i < ARGC; i++)
		printf "ARGV[%d] = %s\n", i, ARGV[i]
	exit
}


# lwh@lwh-HP-Notebook:~/ProjsGit/apue/APUE_my/08_Process_Ctl$ /bin/awk -f ./awkexample file1 FILENAME2 f3
# ARGV[0] = awk
# ARGV[1] = file1
# ARGV[2] = FILENAME2
# ARGV[3] = f3